//
//  ViewController.m
//  UI27-Block练习-播放按钮
//
//  Created by 韩旭 on 16/8/19.
//  Copyright © 2016年 HX_. All rights reserved.
//

#import "ViewController.h"
#import "HX_ViewController.h"

@interface ViewController ()
@property (nonatomic, strong) HX_ViewController *hx_view;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor redColor];
    UIImageView *image = [[UIImageView alloc] initWithFrame:self.view.bounds];
    image.image = [UIImage imageNamed:@"newsPic2.jpg"];
    [self.view addSubview:image];
    self.hx_view = [[HX_ViewController alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    _hx_view.backgroundColor = [UIColor clearColor];
    [_hx_view play:^(UIButton *playBtn) {
        NSLog(@"播放%@", playBtn);
    } pause:^(UIButton *stopBtn) {
        NSLog(@"zanting");
    }];
    [_hx_view nextBtn:^(UIButton *nextBtn) {
        NSLog(@"下一曲");
    } LastBtn:^(UIButton *lastBtn) {
        NSLog(@"上一曲");
    }];
    [self.view addSubview:_hx_view];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
